#include "StdAfx.h"
#include ".\threadpool.h"
#include "Thread.h"

CThreadPool::CThreadPool(void)
{
}

CThreadPool::~CThreadPool(void)
{
}


bool CThreadPool::Create(int nThread){
	assert(nThread>0);
	CThread *pth;
	for(int i=0;i!=nThread;i++){
        if (!(pth=new CThread()))
			return false;
		if (!pth->Start())
			return false;
	}
	return true;
}